<!--
 * @Author: caozaihui 15908754730@163.com
 * @Date: 2024-06-14 00:47:40
 * @LastEditors: caozaihui 15908754730@163.com
 * @LastEditTime: 2024-06-25 21:52:44
 * @FilePath: \YMU_forum_vue\src\views\User\components\left\UserArticle.vue
 * @Description:用户文章
-->

<script setup>
import ArticleCardFull from '@/components/article/ArticleCardFull.vue';

import { getUserArticleList } from '@/apis/user';
import {onMounted, ref} from "vue";

const articleList = ref([]);

onMounted(() => {

  getUserArticleList().then(res => {
    articleList.value = res.data.pageInfo.list;
    // console.log(articleList.value)
  });
});
</script>

<template>
    <div>
        <div>
            <el-text class="mainTitle">我的全部文章</el-text>
        </div>
        <div style="margin-top: 20px; width: 100%;">
          <div>
            <!-- 参数指明是作者 -->
            <ArticleCardFull :articleList="articleList" :author="1"/>
          </div>
        </div>
    </div>
</template>

<style scoped>
.mainTitle {
    margin-left: 30px;
    font-size: 18px;
    color: #000;
    font-weight: bolder;
}
</style>